using System;
using Lucene.Net.Search;

namespace Lucene.Linq.Expressions
{
    ///<summary>
    /// Lucene Search Query Container
    ///</summary>
    public class SearchQueryContainer : ISearchQuery
    {
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="q">The query</param>
        /// <param name="s">The sort</param>
        public SearchQueryContainer(Query q, Sort s)
        {
            if (q == null) throw new ArgumentNullException("q");
            Query = q;
            Sort = s;
        }

        /// <summary>
        /// Lucene Sort
        /// </summary>
        public Sort Sort { get; private set; }

        #region ISearchQuery Members

        /// <summary>
        /// Lucene Query
        /// </summary>
        public Query Query { get; private set; }

        #endregion
    }
}